<?php include("header.php"); ?>

<script type="text/javascript">
    function validate()
	{
        var name = document.getElementById('name');
		var code = document.getElementById('code');
        var type = document.getElementById('type');
        var value = document.getElementById('value');
        
        
        if(isEmptyTextBox(name, '<?php echo _MSG_PARAM_NAME_NOT_EMPTY; ?>'))
        {
            return false;
        }  
        
        if(isEmptyTextBox(code, '<?php echo _MSG_PARAM_CODE_NOT_EMPTY; ?>'))
        {
            return false;
        }
        
        if(isEmptyTextBox(value, '<?php echo _MSG_PARAM_VALUE_NOT_EMPTY; ?>'))
        {
            return false;
        }
        
              
		document.parameter.submit();
	}

</script>

	<div class="one_center">
		<div class="box_two_third">
			<div class="box_head"><?php echo _LB_PARAMETER; ?></div>
			<div class="box_content" >
				<form action="" name="parameter" method="post">
				<input type="hidden" id="id" name="id" value="<?php $parameter->id; ?>"/>
				<input type="hidden" id="act" name="act" value="<?php echo ACT_VALID_EDIT; ?>"/>
				<table cellpadding="0" cellspacing="5px" border="0">                                       
					
					<tr>
						<td width="20%"><label><?php echo _LB_PARAM_NAME; ?>&nbsp;:&nbsp;<?php echo _LB_REQUIRE_FIELD; ?></label></td>
                        <td><input name="name" id="name" type="text" size="<?php echo SIZE_NAME; ?>" maxlength="<?php echo MAX_LENGTH_NAME;?>" value="<?php echo $parameter->name; ?>"/></td>
					</tr>
					
                    <tr>
						<td width="20%"><label><?php echo _LB_PARAM_CODE; ?>&nbsp;:&nbsp;<?php echo _LB_REQUIRE_FIELD; ?></label></td>
                        <td><input name="code" id="code" type="text" size="<?php echo SIZE_NAME; ?>" maxlength="<?php echo MAX_LENGTH_NAME;?>" value="<?php echo $parameter->code; ?>"/></td>
					</tr>
                    
                    <tr>
						<td width="20%"><label><?php echo _LB_PARAM_VALUE; ?>&nbsp;:&nbsp;<?php echo _LB_REQUIRE_FIELD; ?></label></td>
                        <td><input name="value" id="value" type="text" size="<?php echo SIZE_NAME; ?>" maxlength="<?php echo MAX_LENGTH_NAME;?>" value="<?php echo $parameter->value; ?>"/></td>
					</tr>
                    
                    <tr>
					  	<td class="submit" colspan="2" style="padding-top: 10px;">
							  <a id="auto_parameter_return" class="tribullet" id="btnReturn" href="<?php echo $backlink; ?>"><?php echo _LB_BACK; ?></a>
							  <a id="auto_parameter_validate" class="tribullet" href="#" onclick="validate()"><?php echo _LB_VALIDATE; ?></a>
						</td>
					</tr>
				</table>
				</form>
			</div>
		</div>
	</div>

<?php include("footer.php"); ?>

